// pages/home/home.js
const app =  getApp();

Page({
  data:{
    /* res:{
      A:["html","css"],
      B:["vue","react"]
    }, */
    city:""
  },
  handleClick(){
    wx.navigateTo({
      url: '/pages/city/city',
    })
  },
  onLoad(){
    // console.log(app.globalData);
    // console.log("onLoad");
    // var city = app.globalData.currentCity;
        app.callback=()=>{
            console.log("onLoad");
            var city = wx.getStorageSync('locationCity');
            console.log(city);
            this.setData({
                city
            })
        }
  },
  
  onShow() {
    // console.log(app.globalData);
    console.log("onshow");
    var city = app.globalData.currentCity;
    this.setData({
      city
    })
  },
  /* onHide() {
    console.log("onHide");
  },
  onReady() {
    console.log("ready");
  },
  onUnload() {
    console.log("onUnload");
  } */
})